package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

@TableName("product")
@Data
public class ProductBean {
    //商品id
    /*@TableId(value = "productId",type = IdType.AUTO)*/
    @TableId(value = "id",type = IdType.AUTO)
    private Long productId;

    //商品编号
    @TableField("productNum")
    private String productNum;

    //商品名
    @TableField("productName")
    private String productName;

    //商品价格
    @TableField("sellPrice")
    private double sellPrice;

    //商品类型
    @TableField("productType")
    private String productType;

    //商品上架状态
    @TableField("putStatus")
    private int putStatus; //0-上架  1-下架 2-待审核

    //商品大小规格
    @TableField("size")
    private String size;

    //商品颜色
    @TableField("color")
    private String color;

    //商品数量
    @TableField("num")
    private int num;

    //商品状态  0-普通商品 1-预售商品 2-促销商品
    @TableField("productStatus")
    private int productStatus;

    //商品进货价
    @TableField("purchasingPrice")
    private double purchasingPrice;
    @TableField(exist = false)
    private ProductESBean productESBean;
    
    public ProductBean() {
    }
    
    public ProductBean(String productNum, String productName,
                       String productType, String size, String color,
                       int num, int productStatus, double purchasingPrice) {
        this.productNum = productNum;
        this.productName = productName;
        this.productType = productType;
        this.size = size;
        this.color = color;
        this.num = num;
        this.productStatus = productStatus;
        this.purchasingPrice = purchasingPrice;
    }
}
